package cn.harry.modular.portrait.domain;

import cn.harry.common.base.BaseEntity;
import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;

/**
 * 用户分群实体对象
 *
 * @author harry
 * @公众号 Harry技术
 */
@Getter
@Setter
@TableName(value = "portrait_user_segments", autoResultMap = true)
public class UserSegments extends BaseEntity {


    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 人群名称
     */
    @Schema(description = "人群名称")
    private String segmentName;
    /**
     * 人群ID
     */
    @Schema(description = "人群ID")
    private String segmentSn;
    /**
     * 创建者
     */
    @Schema(description = "创建者")
    private String creator;
    /**
     * 人数
     */
    @Schema(description = "人数")
    private Integer memberCount;

    /**
     * 推送: 消息通知、电子邮件、短信
     */
    @Schema(description = "推送: 消息通知、电子邮件、短信")
    private String pushStatus;
    /**
     * 查询参数
     */
    @Schema(description = "查询参数")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONArray selectConditions;
    /**
     * 有效状态，0:无效 1:有效
     */
    @Schema(description = "有效状态，0:无效 1:有效")
    private Integer valid;
}
